package com.miao.FeignClient;

import com.miao.FeignClient.po.CourseIndex;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class fallbackFactoryOfEs implements FallbackFactory<EsClient> {
    @Override
    public EsClient create(Throwable throwable) {
        return new EsClient() {
            @Override
            public Boolean add(CourseIndex courseIndex) {
                log.error("es同步熔断降级！");
                return false;
            }
        };

    }
}
